
(defvar mh-progs "/usr/local/mh" "Directory containing MH commands")

(defvar mh-lib "/usr/local/lib/mh" "Directory of MH library")

(defvar mh-folder-mode-hook nil "Invoked in mh-folder-mode")

(defvar mh-letter-mode-hook nil "Invoked in mh-letter-mode")

(defvar mh-auto-fill-letters t "Invoke auto-fill-mode in letters")

(defvar mh-clean-message-header nil "Remove invisible header lines in messages")

(defvar mh-lpr-command-format "lpr -p -J '%s'" "Format for Unix command line to print a message. The format should be
a unix command line, with the string " %s " where the folder and message
number should appear.")

(defvar mh-summary-height 4 "Number of lines in summary window")

(defvar mh-cmd-note 4 "Offset to insert notation")

(defvar mh-invisible-headers "^Received: \\|^Message-Id: \\|^Remailed-\\|^Via: \\|^Mail-from: \\|eturn-Path: \\|^In-Reply-To: \\|^Resent-" "Regexp specifying headers that are not to be shown.")

(defvar mh-user-path "" "User's mail folder")

(defvar mh-last-folder "inbox" "Last folder read by mh-rmail")

(defvar mh-last-destination nil "Destination of last " move " command")

(defvar mh-current-folder nil "Currently active folder")

(defvar mh-folder-buffer nil "Buffer name of currently active folder")

(defvar mh-show-buffer nil "Name of buffer that displays messages")

(defmacro push (v l) (byte-code "��	EE�" [l v setq cons] 5))

(defmacro caar (l) (byte-code "��DD�" [l car] 3))

(defmacro cadr (l) (byte-code "��DD�" [l car cdr] 3))

(defmacro cdar (l) (byte-code "��DD�" [l cdr car] 3))

(defmacro cddr (l) (byte-code "��DD�" [l cdr] 3))

(defun mh-rmail (&optional arg) "\
inc(orporate) new mail if optional ARG omitted, or scan a MH mail box
if arg is present.  This front end uses the MH mail system, which uses
different conventions from the usual mail system." (interactive "P") (byte-code "��	��� �͋-�" [make-backup-files nil track-eol t pop-up-windows mh-current-folder mh-folder-buffer arg folder mh-last-folder range mh-show-buffer mh-find-path ((byte-code "�! ��
#��!�	��\"� ς \"*�' ��!�� ��P�!�Վ� ))�" [arg folder mh-last-folder t range mh-show-buffer mh-current-folder mh-folder-buffer mh-get-folder-name "mh" read-string "range [all]? " mh-scan-folder equal "" "all" mh-make-folder "inbox" mh-inc-folder "show-" pop-to-buffer ((byte-code "�!��	!���" [mh-folder-buffer mh-show-buffer mh-last-folder mh-current-folder kill-buffer] 5)) mh-command-loop] 22))] 8))

(defun mh-smail nil "\
Send mail using the MH mail system." (interactive) (byte-code "��	� ���!+�" [make-backup-files nil track-eol t pop-up-windows mh-find-path call-interactively mh-send] 8))

(defun mh-answer nil "\
Answer a letter." (interactive) (byte-code "ƈǋ�" [msg-filename msg t reply-to mh-folder-buffer mh-user-path nil ((byte-code "� �
!����#��!���\"�$ ���	��&�K ��\"�9 ���	����&�K ��\"�K ���	����&���P�\"�� ��� !�a ��!?�r � ���P!���P!�db���!�� ��!�� �!�� ��\"�eb���!���!���!���!�� ��	����!&�� �+�" [msg-filename msg t reply-to mh-folder-buffer mh-user-path mh-msg-filename mh-get-msg-num mh-get-response "Reply to (f, t, c, ?): " (102 116 99) "Reply to F(rom), T(o + From), C(c + To + From): " message "Composing a reply..." equal 102 mh-exec-cmd "repl" "-build" "-nocc" "all" 116 "-cc" "to" "me" 99 mh-read-file "/draft" "draft" delete-other-windows zerop buffer-size y-or-n-p "The file 'draft' exists.  Use for reply? " erase-buffer insert-file-contents "/reply" delete-file pop-to-buffer "*message*" file-exists-p error "File %s does not exist" re-search-forward "^$\\|^-*$" recenter 0 "Composing a reply...done" mh-compose-and-send-mail "" mh-annotate "R" "-component" "Replied-To:" "-text" char-to-string nil] 46))] 3))

(defun mh-close-folder nil "\
Process the outstanding delete and move commands in the current folder." (interactive) (byte-code "È��!��!��	!���!�� ����!�" [mh-folder-buffer t mode-line-format nil message "closing folder..." mh-process-commands mh-unmark-all-headers mh-regenerate-headers "all" mh-make-mode-line "closing folder...done"] 9))

(defun mh-copy-msg (&optional arg) "\
Copy specified message(s) to another folder without deleting them." (interactive "P") (byte-code "Ĉ	� ���!!� �
!���������
#\"&)�" [msgs arg t mh-folder-buffer nil mh-seq-to-msgs mh-read-seq "Copy" mh-get-msg-num mh-exec-cmd-no-wait "refile" "-link" "-src" format "+%s" mh-get-folder-name "Copy to" ""] 18))

(defun mh-delete-msg (&optional arg) "\
Marks the specified message(s) for later deletion." (interactive "P") (byte-code "ň	� ��!� �
!B��	�\" ��#�& ��\"���!)�" [msgs arg t mh-delete-list mh-cmd-note nil mh-read-seq "Delete" mh-get-msg-num mh-notate-seq 68 mh-notate mh-next-line 1] 14))

(defun mh-exit nil "\
Exit mh-e and process outstanding delete and move commands." (interactive) (byte-code "� 	?� ��
\"�  ��!�  �!���
\"�" [mh-delete-list mh-move-list nil mh-folder-buffer throw exit yes-or-no-p "Exit? " mh-process-commands] 9))

(defun mh-forward (to subject cc) "\
Forward a letter." (interactive "sTo: 
sSubject: 
sCc: ") (byte-code "Ȉɋ�" [msg-filename msg t mh-user-path mh-folder-buffer to subject cc nil ((byte-code "� �
!��P!?� ��!�2 ���	$���P�\"�����&�< 
�< ��P�\"�eb�� ���!�_ ��	���&���	���&*�" [msg-filename msg t mh-user-path mh-folder-buffer to subject cc mh-msg-filename mh-get-msg-num file-exists-p "/draft" y-or-n-p "The file 'draft' exists.  Discard it? " mh-exec-cmd "forw" "-build" mh-read-file "draft" mh-insert-fields "To:" "Subject:" "Cc:" delete-other-windows mh-compose-and-send-mail "" mh-annotate "F" "-component" "Forwared-To:" "-text" "Forwared-cc:"] 24))] 3))

(defun mh-goto (number &optional no-error-if-no-message) "\
Position the cursor at a particular message." (interactive "nMessage number? ") (byte-code "È�!�`eb���
P#?�) 	b�?�% ��
\"�& Â< �< � �?�; � �< �)�" [mh-folder-buffer starting-place number nil t no-error-if-no-message mh-summarize pop-to-buffer re-search-forward "^[0-9a-z+ ]*[ ]*" error "No message %d " beginning-of-line mh-show] 13))

(defun mh-inc-folder nil "\
inc(orporate) new mail in the current folder." (interactive) (byte-code "��� �" [nil mh-get-new-mail] 3))

(defun mh-indicate-seq (&optional arg) "\
Add the specified message(s) to a sequence." (interactive "P") (byte-code "Ĉ�	!��!� 
� �!� ��!\"�% ��!\")�" [seq last-input-char arg t nil mh-letter-to-seq looking-at "^[0-9a-j]" mh-remove-seq mh-remove-msg-from-seq mh-get-msg-num mh-add-msg-to-seq] 15))

(defun mh-kill-folder nil "\
Removes the current folder." (interactive) (byte-code "����!� ��!���� \"���!���\"�$ 	�$ ��!�" [nil t yes-or-no-p "Remove current folder " pop-to-buffer " *mh-temp*" mh-exec-cmd "rmf" buffer-name message "Folder removed" throw exit "Folder not removed"] 11))

(defun mh-list-folders nil "\
List mail folders." (interactive) (byte-code "����!���!�� ���!�eb���!�" [nil message "listing folders..." pop-to-buffer " *mh-temp*" erase-buffer mh-exec-cmd-output "folders" "listing folders...done"] 7))

(defun mh-print-msg (&optional arg) "\
Print specified message(s) on a line printer." (interactive "P") (byte-code "ǈ	� ����!!!� �
!C��!�����\"��	�, Ղ3 ��
!Q\"%!���!)�" [msgs arg t mh-lib mh-folder-filename mh-lpr-command-format mh-current-folder nil reverse mh-seq-to-msgs mh-read-seq "Print" mh-get-msg-num message "printing message..." shell-command concat "/mhl -noclear -nobell " mh-msg-filenames " | " format "Mail" "/" "printing message...done"] 22))

(defun mh-move (&optional arg) "\
Move specified message(s) to another folder." (interactive "P") (byte-code "Ĉ	� ��!� �
!���
#���\"���!)�" [msgs arg t mh-last-destination nil mh-read-seq "Move" mh-get-msg-num mh-get-folder-name "Destination" "" mh-refile mh-next-line 1] 12))

(defun mh-next-line (&optional arg) "\
Move to next undeleted message in window and display body if summary
flag set." (interactive "p") (byte-code "È�!��	� 	� �!���!� m?�$ ��!�� �m�; n�3 ��!�4 È��!�F 
?�E � �F Ç" [mh-folder-buffer arg mh-summarize nil pop-to-buffer forward-line 1 looking-at "^....[D^]" -1 message "No more messages" mh-show] 17))

(defun mh-renumber-folder nil "\
Renumber messages in folder to be 1..N." (interactive) (byte-code "����!��!�� ��	!�� ���!�" [mh-folder-buffer nil message "packing buffer..." pop-to-buffer mh-pack-folder mh-unmark-all-headers mh-position-to-current "packing buffer...done"] 8))

(defun mh-page-digest nil "\
Advance displayed message to next digested message." (interactive) (byte-code "����!��	!���	
#?� ��!���!���!���!)�" [mh-show-buffer nil t pop-to-buffer move-to-window-line re-search-forward "^From:" other-window -1 error "No more messages" recenter 0] 11))

(defun mh-previous-line (&optional arg) "\
Move to previous message in window and display body if summary flag set." (interactive "p") (byte-code "È�!��	� 	� �[!���!� o?�% ��!�� �o�0 ��!�; 
?�: � �; Ç" [mh-folder-buffer arg mh-summarize nil pop-to-buffer forward-line 1 looking-at "^....[D^]" -1 message "Beginning of messages" mh-show] 14))

(defun mh-previous-page nil "\
Page the displayed message backwards." (interactive) (byte-code "����!��	!���!)�" [mh-show-buffer nil pop-to-buffer scroll-down other-window -1] 6))

(defun mh-quit nil "\
Quit mh-e without processing outstanding delete and move commands." (interactive) (byte-code "È� 	� ��!?� �
!� È��\"�" [mh-delete-list mh-move-list mh-folder-buffer nil yes-or-no-p "Quit without processing? " mh-process-commands throw exit] 8))

(defun mh-rescan-folder (&optional arg) "\
Optionally process commands in current folder and (re)scan it." (interactive "P") (byte-code "ň�!�	� 
� ��!� �!� ň��' ��!�( �!�� ���!�� �" [mh-folder-buffer mh-delete-list mh-move-list arg mode-line-format nil pop-to-buffer y-or-n-p "Process commands? " mh-process-commands mh-regenerate-headers read-string "Range? " "all" mh-make-mode-line mh-unmark-all-headers mh-position-to-current] 16))

(defun mh-redistribute (to cc) "\
Redistribute a letter." (interactive "sTo: 
sCc: ") (byte-code "ǈȋ�" [msg-filename msg t mh-user-path to cc mh-folder-buffer nil ((byte-code "� �
!��P�\"�� ��� !� ��!?�@ � ��!�eb����#���\"?�? ���#�@ وeb���!�a ��	���&���	���&*�" [msg-filename msg t mh-user-path to cc mh-folder-buffer mh-msg-filename mh-get-msg-num mh-read-file "/draft" "draft" delete-other-windows zerop buffer-size y-or-n-p "The file 'draft' exists.  Redistribute? " erase-buffer insert-file-contents insert "Resent-To: " "
" equal "" "Resent-cc: " nil mh-compose-and-send-mail "-dist" mh-annotate "F" "-component" "Distributed-to:" "-text" "Distributed-cc:"] 27))] 3))

(defun mh-re-move nil "\
Move specified message to same folder as last move." (interactive) (byte-code "?� ��!� ��	!\"�" [mh-last-destination t nil error "No previous move" mh-refile mh-get-msg-num] 7))

(defun mh-search-folder nil "\
Search for letters containing pattern." (interactive) (byte-code "È� � �	!�	��B�	�E\"\"��	�
�$+�" [pattern seq search-note nil mh-make-pick-args mh-new-seq mh-seq-to-notation mh-seq-from-command nconc "pick" "-seq" "-list" mh-apply-to-seq mh-notate 0] 13))

(defun mh-send (to subject cc) "\
Compose and send a letter." (interactive "sTo: 
sSubject: 
sCc: ") (byte-code "ň��!�ȋ�" [mh-user-path mh-lib to subject cc nil message "Composing a message..." ((byte-code "��P�\"�� ��� !� ��!?�O � ���P!�+ ��P!�> �	�P!�; �	�P!�> ��!���
��&�db���!���!�" [mh-user-path mh-lib to subject cc mh-read-file "/draft" "draft" delete-other-windows zerop buffer-size y-or-n-p "The file 'draft' exists.  Use it? " erase-buffer file-exists-p "/components" insert-file-contents error "Can't find components" mh-insert-fields "To:" "Subject:" "Cc:" message "Composing a message...done" mh-compose-and-send-mail ""] 23))] 4))

(defun mh-show nil "\
Show currently indicated message." (interactive) (byte-code "��	���
!��!� �!�I B���	!�� ��!��
�� ��A � �B ���	!�Q �Q ��\"���	#�� ���!�����%�+�� �" [mh-summarize nil mh-folder-buffer msgn t msg-filename folder mh-current-folder mh-shown-msgs mh-show-buffer buffer-file-name mh-clean-message-header mode-line-format pop-to-buffer mh-get-msg-num mh-msg-filename file-exists-p switch-to-buffer erase-buffer insert-file-contents mh-letter-mode set-buffer-modified-p error "message %d does not exist" re-search-forward "^To:\\|^From:\\|^Subject:" beginning-of-line recenter 0 concat "{%b}	%[%p of +" "/" "%]	%M" mh-redisplay] 29))

(defun mh-summary nil "\
Show a summary of mh-e commands." (interactive) (byte-code "����!���!�" [nil message "Next Prev Go Del ^ ! Copy Undo . Toggle Ans Forw Redist Send List Quit Exit" sit-for 5] 4))

(defun mh-toggle-summarize nil "\
turn the summary mode of displaying messages on or off." (interactive) (byte-code "��?��?� � � � �" [mh-summarize nil mh-show delete-other-windows] 7))

(defun mh-undo (&optional arg) "\
undo the deletion or move of the specified message(s)." (interactive "p") (byte-code "ǈ��!�1 	� ��!� �
!�\"��	�) ��#�- ��\")�e ��!�_ 	�A ��!�D �
!��\"�	�W ��#�[ ��\")�e 
�e �" [msgs arg t mh-delete-list mh-cmd-note move mh-move-list nil looking-at "^....d" mh-read-seq "undelete" mh-get-msg-num delq mh-notate-seq 32 mh-notate "^....^" "unmove" mapcar (lambda (move) (byte-code "��	A\"\"�" [msgs move setcdr delq] 5))] 30))

(defun mh-visit-folder (&optional arg) "\
visit a new folder." (interactive "p") (byte-code "ƈ�����#�
Pˋ,�" [mh-current-folder mh-folder-buffer folder t mh-show-buffer arg nil mh-get-folder-name "visit" "" "show-" ((byte-code "��P!�� �V� ��\"� ʈ�	�\" ��!�# �\"��
!�Ў� )�" [folder arg mh-show-buffer mh-folder-buffer switch-to-buffer "+" buffer-size 0 error "folder +%s is open. close it before revisiting." nil mh-scan-folder read-string "range? " "all" pop-to-buffer ((byte-code "�!��	!�" [mh-show-buffer mh-folder-buffer kill-buffer] 4)) mh-command-loop] 14))] 7))

(defun mh-command-loop nil "\
read and execute mh commands." (byte-code "�!�� �� �" [mh-folder-buffer pop-to-buffer delete-other-windows recursive-edit] 5))

(defun mh-refile (msgs destination) "\
refile the msgs in the folder called destination." (byte-code "�	
\"� �AB\"� 	CB
B���!�) ��\"�. ��#)�" [others destination mh-move-list msgs mh-cmd-note assoc setcdr integerp mh-notate 94 mh-notate-seq] 14))

(defun mh-clean-message-header nil "\
Flush extraneous lines in a message header.  The variable
mh-invisible-headers contains a regular expression specifying these lines." (byte-code "�eb���	#��e`\"�eb��
	#�5 � ���!���!�1 � ���!��! �� )�" [nil t mh-invisible-headers re-search-forward "^$" narrow-to-region beginning-of-line kill-line 1 looking-at "^[ 	]+"] 11))

(defun mh-read-file (file-name buffer-name) "\
Read file FILE-NAME into buffer BUFFER-NAME.  No errors if disk file
has been modified." (byte-code "�!��!��!��	!� �	
\"� 	���!�" [buffer-name file-name t buffer-file-name nil pop-to-buffer kill-buffer file-exists-p insert-file-contents set-buffer-modified-p] 11))

(defun mh-make-folder (name) "\
Create and initialize a new mail folder called NAME and make
it the current folder." (byte-code "	���	P���
!�� ���� �� ���!��	Q����!�����!�Չ	���!��
���!�����!�����!�����" [mh-current-folder name mh-folder-buffer buffer-read-only nil mh-folder-filename mh-user-path mh-summarize t mh-next-seq-num mh-delete-list mh-move-list mh-seq-list mh-shown-msgs "+" switch-to-buffer kill-all-local-variables mh-folder-mode erase-buffer make-variable-buffer-local "/" 0] 24))

(defun mh-folder-mode nil "\
    n: next message			p: previous message
    d: delete (mark for deletion)	^: put (mark for moving)
    u: undo last delete or mark		!: repeat last ^ command
    c: copy message to another folder

    .: type message			t: toggle summarize mode
  SPC: page message		      DEL: page message backwards
    l: print message			g: goto a message

    e: exit				q: quit

    s: send a message			r: redistribute a message
    a: answer a message 		f: forward a message

  M-f: visit folder		      M-i: inc mail
  M-c: close folder		      M-k: kill folder
  M-l: list folders		      M-p: pack folder
  M-r: rescan folder		      M-s: search folder

Edit the scan list, marking messages.

When you are done, type 'e'.  The messages marked for deletion will be
deleted and messages marked for moving will be moved.

In any of the submodes, such as editing a message ('m' command) or composing
a message (the 'a', 'f', 'r', or 's' commands), exit with ^X^C." (byte-code "��!��!�ǉ�ȉ���!� �  �!�! ˇ" [mh-keymap major-mode mode-name mh-folder-mode-hook auto-save-mode -1 use-local-map mh-folder-mode "mh-folder" boundp funcall nil] 10))

(defun mh-scan-folder (folder range) "\
Scan the folder FOLDER over the range RANGE." (byte-code "�!��	!���!�+ � )��	�\"�\" ��\"�' ��	#���!�� ���!�� �" [folder range buffer-read-only nil mode-line-format mh-make-folder mh-regenerate-headers looking-at "scan: no messages " erase-buffer equal "all" message "Folder +%s is empty" "No messages in +%s, range %s" sit-for 5 mh-make-mode-line mh-unmark-all-headers mh-position-to-current] 19))

(defun mh-regenerate-headers (range) "\
Replace buffer with scan of its contents over range RANGE." (byte-code "	���� \"!�� �� ���� 
#�eb����� \"!)�" [buffer-read-only nil range message format "scanning %s..." buffer-name delete-other-windows erase-buffer mh-exec-cmd-output "scan" "scanning %s...done"] 14))

(defun mh-get-new-mail nil "\
Read new mail into the current buffer." (byte-code "	���� \"!�db�`s���!����� \"!�ab���!�3 ��!���!���!�: 
�: ��!)�� ��" [buffer-read-only nil t mode-line-format message format "inc %s..." buffer-name mh-exec-cmd-output "inc" "inc %s...done" looking-at "inc: no mail" kill-line 1 "No new mail" sit-for 5 2 mh-make-mode-line] 20))

(defun mh-make-mode-line nil "\
Returns a string for mode-line-format." (byte-code "�eb�`s�db��`a\"eb��
!��
#��
!db���!��
!����V�? ��	��%�@ ��J �P�K ��&)))))�" [lines first nil t current last count-lines mh-get-msg-num re-search-forward "[ ]*[0-9]*\\+" previous-line 1 concat "{%b} %[" " messages" 0 " (" " - " ")" "" " cur = " "%] "] 23))

(defun mh-unmark-all-headers (remove-all-flags) "\
This function removes all + flags from the headers, and if called
  with a non-nil argument, removes all D and ^ flags too." (byte-code "�!�
eb�� ��
#� ��
#�' ��!��c��	 )�" [mh-folder-buffer buffer-read-only nil remove-all-flags t switch-to-buffer re-search-forward "^....\\+" "^\\D\\|^\\^\\|^....\\+" delete-backward-char 1 " "] 10))

(defun mh-position-to-current nil "\
Position the cursor at the current message." (byte-code "�	!�!� �
\"� ��\"�db���!���!�+ ���\"���!)�" [curmsg mh-folder-filename t mh-get-cur-msg zerop mh-goto message "No message %s" forward-line -1 looking-at "[ ]+[0-9]+" mh-notate 43 0 recenter] 15))

(defun mh-pack-folder nil "\
Closes and packs the current folder." (byte-code "	��!��
!���!���
�#���!���!)�� ��" [buffer-read-only nil mh-folder-buffer mode-line-format message "closing folder..." mh-process-commands "packing folder..." mh-exec-cmd "folder" "-pack" mh-regenerate-headers "all" "packing done" mh-make-mode-line] 12))

(defun mh-apply-to-message-list (func list) "\
Apply function FUNC to each item in a message-list LIST,
passing the name and list of messages as arguments." (byte-code "��
\"�" [func l list mapcar (lambda (l) (byte-code "�	@	AD\"�" [func l apply] 4))] 3))

(defun mh-process-commands (buffer) "\
Process outstanding commands for the buffer BUFFER." (byte-code "��!��!�
�!��! ������\"D\"\"�\" ��\"��@ ������\"D�C#\"�A 



�)���!�" [buffer buffer-read-only nil mh-seq-list mh-delete-list msgs dest mh-move-list mh-shown-msgs message "Processing deletes and moves..." switch-to-buffer mh-process-seq-commands apply mh-exec-cmd nconc "rmm" format "%s" mh-apply-to-message-list (lambda (dest msgs) (byte-code "����B���	\"��
\"E\"\"�" [msgs buffer dest apply mh-exec-cmd nconc "refile" "-src" format "%s" "+%s"] 10)) mh-exec-cmd-no-wait "show" "-noformat" "Processing deletes and moves...done"] 21))

(defun mh-letter-mode nil "\
Mode for composing letters in mh.
^N and ^P work normally in the body of a letter but hug the end of field names
in the header.
^X^C exits and sends a letter." (byte-code "� �� ��!� Ɉʉ�ˉ����\"����\"�щ�҉���!�0 �9 �!�: ɇ" [mh-auto-fill-letters paragraph-separate paragraph-start major-mode mode-name mh-letter-mode-hook text-mode auto-fill-mode 1 nil "^[- 	]*$" "^$\\|^\\|^-+$" local-set-key "" mh-header-next "" mh-header-previous mh-letter-mode "mh-letter" boundp funcall] 15))

(defun mh-header-next (&optional arg) "\
Modified ^N command that skips to end of header field names." (interactive "p") (byte-code "���� � �!�� �" [arg nil next-line 1 mh-header-line-position] 6))

(defun mh-header-previous (&optional arg) "\
Modified ^P command that skips to end of header field names." (interactive "p") (byte-code "���� � �!�� �" [arg nil previous-line 1 mh-header-line-position] 6))

(defun mh-dot-in-header nil "\
t iff cursor in message header." (byte-code "�`eb���	
#�� ���!�`Y))�" [wasdot nil t re-search-forward "^-*$" beginning-of-line backward-char 1] 8))

(defun mh-header-line-position nil "\
Position cursor at end of field name when in header." (byte-code "� �3 �� ���!?)�0 � ���	#�l�# �c�0 ��!�0 ��!��# �4 ��" [nil t mh-dot-in-header beginning-of-line looking-at " \\|	" search-forward ":" " " "[ 	]" forward-char 1] 14))

(defun mh-make-pick-args nil "\
Prompt the user for a pattern to look for in messages and return a string
for the pick command." (byte-code "���" [mode-line-format ((byte-code "��!��� !� ��!?� � � Ȉ���\"���΍)�" [mode-line-format pop-to-buffer " *pattern*" zerop buffer-size y-or-n-p "Reuse pattern? " mh-pick-template nil local-set-key "" mh-make-pick-pattern "{%b}	Pick Pattern	^X^C to exit and search" mh-pattern (byte-code "� �" [recursive-edit] 3)] 14))] 3))

(defun mh-make-pick-pattern nil (interactive) (byte-code "������ � \"\"�" [nil throw mh-pattern nconc mh-pick-header mh-pick-body] 7))

(defun mh-pick-template nil (byte-code "� ��������&�eb�� �� �" [erase-buffer insert "From: 
" "To: 
" "Cc: 
" "Date: 
" "Subject: 
" "---------
" end-of-line mh-letter-mode] 8))

(defun mh-pick-header nil "\
Return the pick string for the header fields." (byte-code "	eb���	
#�* ��!���� !P��!��� D\"�)�� ���!�)�" [pat nil t component re-search-forward "^\\([a-zA-Z].*\\):[ 	]*\\([a-zA-Z0-9].*\\)$" region-around-match 1 "-" downcase region-to-string 2 nconc forward-line] 15))

(defun mh-pick-body nil "\
Return the pick string for the message body." (byte-code "eb���!���!�`s�db�� G�V�! �D�\" 	)�" [body nil re-search-forward "^-*$" forward-char 1 region-to-string 0 "-search"] 9))

(defun mh-compose-and-send-mail (send-args) "\
Edit a draft message and send or save it.  SEND-ARGS is passed to the
send command.  Returns t if mail is being sent." (byte-code "���" [mode-line-format ((byte-code "��!�� ����\"����\"�� ���̍)�" [mode-line-format pop-to-buffer "draft" mh-letter-mode local-set-key "" mh-send-letter "" mh-insert-letter mh-header-line-position "{%b}  %[Mail/draft%] (%p - %m)  (^X^C to finish  ^X^Y to yank msg)  %M" mail-send (byte-code "� �" [recursive-edit] 3)] 11))] 3))

(defun mh-send-letter nil "\
Prompt the user as to the disposition of the just-composed letter." (interactive) (byte-code "Ĉ� ������#�	�\"�, ��!�����
� %���!���\"�; �	�\"�; ��!���\"*�" [mode-line-format action send-args t nil save-buffer "{%b}  %[Mail/draft%]  (%p - %m)  %M" mh-get-response "Ready to send. Action (s, q, e, ?): " (115 98 113 101 3) "S-end, Q-uit, E-dit " equal 115 message "Sending..." mh-exec-cmd-no-wait "send" "-push" "-unique" buffer-file-name "Sending...done" throw mail-send 113 "Not sent... Message remains in buffer draft"] 18))

(defun mh-insert-letter nil "\
Insert a message in the current letter." (interactive) (byte-code "��	
#����\"!����%!*�" [folder mh-current-folder nil message mh-user-path mh-get-folder-name "Message from" string-to-int read-input "Message number: " "" insert-file-contents concat "/"] 12))

(defmacro mh-seq-name (pair) (byte-code "�D�" [pair car] 2))

(defmacro mh-seq-msgs (pair) (byte-code "�D�" [pair cdr] 2))

(defun mh-seq-to-msgs (seq) "\
Returns the list of messages in sequence SEQ." (byte-code "�	\"A�" [seq mh-seq-list assoc] 3))

(defun mh-read-seq (prompt) "\
Prompt the user with PROMPT and read a sequence name." (byte-code "������#!!!�" [prompt mh-letter-to-seq string-to-char read-string format "%s %s" "sequence: "] 7))

(defun mh-seq-from-command (seq command) "\
Make a sequence called SEQ by executing the form COMMAND." (byte-code "	ǋ)�" [msgs nil command t num mh-seq-list seq ((byte-code "��!�� ���\"�eb���	
#�5 ��!��� !�!?�/ B��0 �)�� �BB���" [command nil t num msgs mh-seq-list seq pop-to-buffer " *mh-temp*" erase-buffer apply mh-exec-cmd re-search-forward "\\([0-9]+\\)" region-around-match 1 string-to-int region-to-string zerop] 15))] 5))

(defun mh-remove-seq (seq) "\
Delete the sequence SEQ." (byte-code "�	
\"�@
\"���@A���$)�" [entry seq mh-seq-list assoc delq mh-apply-to-seq mh-notate 32 0] 9))

(defun mh-remove-msg-from-seq (msg-num seq) "\
Remove a message MSG-NUM from the sequence SEQ." (byte-code "�	\"�@�
@A\"\")���\"�" [seq mh-seq-list msg-num mh-cmd-note assoc setcdr delq mh-notate 32] 8))

(defun mh-add-msg-to-seq (msg-num seq) "\
Add a message MSG-NUM to a sequence SEQ." (byte-code "�	
\"��	!�\"�?� 	CB
B��# �AB\")�" [seq-list seq mh-seq-list msg-num assoc mh-notate mh-seq-to-notation 0 setcdr] 11))

(defun mh-new-seq nil "\
Return a new sequence name." (byte-code "��!�	�U� ��!� ƈ	�\\���	S�\\!)�" [mh-folder-buffer mh-next-seq-num switch-to-buffer 10 error "No more sequences" nil 1 mh-letter-to-seq 97] 8))

(defun mh-letter-to-seq (letter) "\
Given a LETTER, return a string that is a valid sequence name." (byte-code "�Y�	 �W� ���!P!�3 �Y� �W�, ���!P!�3 	�3 ��!�" [letter t 48 57 intern "mhe" char-to-string 97 122 error "A sequence is named 0...9"] 12))

(defun mh-seq-to-notation (seq) "\
Return the string used to indicate sequence SEQ in a scan listing." (byte-code "��!��O!�" [seq string-to-char symbol-name 3 4] 5))

(defun mh-notate-seq (seq notation offset) "\
Mark all messages in the sequence SEQ with the NOTATION at character
OFFSET." (byte-code "��	
$�" [seq notation offset mh-apply-to-seq mh-notate] 5))

(defun mh-apply-to-seq (seq function &rest args) "\
For each message in sequence SEQ, evaluate the FUNCTION with ARGS." (byte-code "���!\"�" [msg function args seq mapcar (lambda (msg) (byte-code "�!��	
\"�" [msg function args mh-goto apply] 4)) mh-seq-to-msgs] 4))

(defun mh-process-seq-commands (seq-list) "\
Process outstanding sequence commands for the sequences in SEQ-LIST." (byte-code "��
\"�" [msgs seq seq-list mh-apply-to-message-list (lambda (seq msgs) (byte-code "���������\"�%	\"\"�" [seq msgs apply mh-exec-cmd nconc list "mark" "-zero" "-seq" format "%s" "-add"] 10))] 3))

(defun mh-exec-cmd (command &rest args) "\
Execute MH command COMMAND with ARGS.  Any output is shown to the user." (byte-code "���!�� �`s�����	Q

F�!\"\"�� �V�, ��� \"���!)�" [mh-progs command nil t args pop-to-buffer " *mh-temp*" erase-buffer apply call-process nconc "/" mh-list-to-string buffer-size 0 message "%s" region-to-string sit-for 5] 13))

(defun mh-exec-cmd-output (command &rest args) "\
Execute MH command COMMAND with ARGS putting the output into the current
buffer." (byte-code "����	Q

F�!\"\"�" [mh-progs command nil t args apply call-process nconc "/" mh-list-to-string] 7))

(defun mh-exec-cmd-no-wait (command &rest args) "\
Execute MH command COMMAND with ARGS and do not wait until it finishes." (byte-code "����	Q
�
F�!\"\"�" [mh-progs command nil args apply call-process nconc "/" 0 mh-list-to-string] 7))

(defun mh-list-to-string (l) "\
Flattens the list L and makes every element a string." (byte-code "	
�t 
@9� ��
@\"B��k �
@!�+ ��
@\"B��k �
@�\"�7 ��k 
@;�F 
@B��k 
@?�P ��k 
@<�b ��
@!\"��k �k ��
@\"�
A��� ��!)�" [new-list nil l t format "%s" numberp "%d" equal "" nconc mh-list-to-string error "Bad argument %s" nreverse] 22))

(defun mh-redisplay nil "\
Redisplay the message summary and the current message." (byte-code "�!�� �	?�\" �
!���!��!��� Z!���!�" [mh-folder-buffer mh-summarize mh-show-buffer mh-summary-height pop-to-buffer delete-other-windows recenter 1 shrink-window window-height] 11))

(defun mh-annotate (note &rest args) "\
Mark the current message with the character NOTE and annotate the message
with ARGS." (byte-code "���B\"��	�\"�" [args note apply mh-exec-cmd-no-wait "anno" mh-notate 5] 4))

(defun mh-notate (notation offset) "\
Marks the current message with the character NOTATION at position OFFSET." (byte-code "��!�
� �`\\b���!�c�� ))�" [mh-folder-buffer buffer-read-only nil offset notation pop-to-buffer beginning-of-line delete-char 1] 9))

(defun mh-get-folder-name (prompt default can-create) "\
Prompt for a folder name with PROMPT.  DEFAULT is the default folder.
If the CAN-CREATE flag is t, then the folder can be made if it does not exist." (byte-code "	
���\"� ̂ ��QQ		?�� �
!����\"�1 ��2 �����O�\"�F ��O��G �����O�\"?�] �Q��` ���!��?�� �w ���Q!�� ��\"���			%���\"���� �� ��!�� �� ��Q��� ��� �)+�" [exists nil prompt default file-name name mh-user-path can-create t " folder" equal "" "? " " [" "]? " read-string 0 1 "+" "/" file-exists-p y-or-n-p "Folder +" " does not exist. Create it? " message "Creating %s" call-process "mkdir" "Creating %s...done" error "Sorry, no such folder as `" "'  Folder name? "] 38))

(defun mh-get-response (prompt possibilities help) "\
Prints PROMPT, reads a character, and checks it against the list
of POSSIBILITIES. Returns the character if it is legal.  The HELP string
is displayed if the character is not legal." (byte-code "		?�Z �!�r��?� �5 �
@\"�+ ��, ��A��� ��
�\"�H �!���!�U ?�U ��
\"���!)�� �
*�" [ok nil first-char pos possibilities prompt t help message equal 63 sit-for 5 "Illegal response '%c'"] 21))

(defun mh-get-msg-num (error-if-no-message) "\
Returns the message number of the current message.  If the flag 
ERROR-IF-NO-MESSAGE is t, then complain if the cursor is not pointing to a
message." (byte-code "��!�� ���!� ��!��� !�9 ��!�* ��!��� !�9 	�4 ��!�9 
�9 )�" [mh-folder-buffer error-if-no-message t nil switch-to-buffer beginning-of-line looking-at "^\\([0-9]+\\)..../" region-around-match 1 string-to-int region-to-string "^[0-9a-z+ ][ ]*\\([0-9]+\\)" error "Cursor not pointing to message"] 18))

(defun mh-msg-filename nil "\
Returns a string containing the pathname for a message." (byte-code "��!�	��
!Q)�" [mh-folder-buffer mh-folder-filename t switch-to-buffer "/" mh-get-msg-num] 5))

(defun mh-msg-filenames (msgs folder) "\
Returns a string for ls specifying the messages MSGS in folder FOLDER." (byte-code "�' 
�PA� 	@�Q��A��� �	@�Q)�( Ƈ" [msgs string folder "/{" "," "}" ""] 8))

(defun mh-find-path nil "\
Set mh_path from  ~/.mh_profile." (byte-code "���" [mh-user-path ((byte-code "��!?� ��!� ň��!�� ���!����!��\"�+ Ή�, ň���O�\"?�C ��!�Q��D Ň" [mh-user-path file-exists-p "~/.mh_profile" error "Can find .mh_profile file." nil switch-to-buffer " *mh_profile*" erase-buffer insert-file-contents equal mh-get-field "Path:" "" "Mail" 0 1 "/" getenv "HOME"] 17))] 3))

(defun mh-get-cur-msg (folder) "\
Returns the cur message from FOLDER." (byte-code "	�Pċ)�" [seq-filename folder t "/.mh_sequences" ((byte-code "�!� ��!�� ��!����!!� 	� ʇ" [seq-filename t file-exists-p switch-to-buffer " *mh_sequences*" erase-buffer insert-file-contents string-to-int mh-get-field "cur: " 0] 10))] 5))

(defun mh-get-field (field) "\
Get the value of field FIELD in the current buffer." (byte-code "eb��	
#?� Ă  
�  ��	
#���!�� �" [field nil t search-forward "" re-search-forward "[	 ]*\\([a-zA-z0-9/].*\\)$" region-around-match 1 region-to-string] 8))

(defun mh-insert-fields (&rest name-values) "\
Insert the NAME-VALUE pairs in the current buffer." (byte-code "	
�A 
@
A@eb���P	#?�+ ��!�� ����$�6 	�6 � ���\"�
AA�*�� )�" [case-fold-search t name-values field-name value nil re-search-forward "^" search-forward "---" beginning-of-line insert " " "
" end-of-line] 16))

(defvar mh-keymap (make-sparse-keymap))

(define-key mh-keymap "?" (quote mh-summary))

(define-key mh-keymap "c" (quote mh-copy-msg))

(define-key mh-keymap "C" (quote mh-copy-msg))

(define-key mh-keymap "d" (quote mh-delete-msg))

(define-key mh-keymap "D" (quote mh-delete-msg))

(define-key mh-keymap "^" (quote mh-move))

(define-key mh-keymap "!" (quote mh-re-move))

(define-key mh-keymap "u" (quote mh-undo))

(define-key mh-keymap "U" (quote mh-undo))

(define-key mh-keymap "l" (quote mh-print-msg))

(define-key mh-keymap "L" (quote mh-print-msg))

(define-key mh-keymap "p" (quote mh-previous-line))

(define-key mh-keymap "P" (quote mh-previous-line))

(define-key mh-keymap "n" (quote mh-next-line))

(define-key mh-keymap "N" (quote mh-next-line))

(define-key mh-keymap "g" (quote mh-goto))

(define-key mh-keymap "G" (quote mh-goto))

(define-key mh-keymap " " (quote scroll-other-window))

(define-key mh-keymap " " (quote mh-page-digest))

(define-key mh-keymap "" (quote mh-previous-page))

(define-key mh-keymap "t" (quote mh-toggle-summarize))

(define-key mh-keymap "T" (quote mh-toggle-summarize))

(define-key mh-keymap "." (quote mh-show))

(define-key mh-keymap "a" (quote mh-answer))

(define-key mh-keymap "A" (quote mh-answer))

(define-key mh-keymap "f" (quote mh-forward))

(define-key mh-keymap "F" (quote mh-forward))

(define-key mh-keymap "r" (quote mh-redistribute))

(define-key mh-keymap "R" (quote mh-redistribute))

(define-key mh-keymap "s" (quote mh-send))

(define-key mh-keymap "S" (quote mh-send))

(define-key mh-keymap "" (quote mh-quit))

(define-key mh-keymap "q" (quote mh-quit))

(define-key mh-keymap "Q" (quote mh-quit))

(define-key mh-keymap "e" (quote mh-exit))

(define-key mh-keymap "E" (quote mh-exit))

(define-key mh-keymap "0" (quote mh-indicate-seq))

(define-key mh-keymap "1" (quote mh-indicate-seq))

(define-key mh-keymap "2" (quote mh-indicate-seq))

(define-key mh-keymap "3" (quote mh-indicate-seq))

(define-key mh-keymap "4" (quote mh-indicate-seq))

(define-key mh-keymap "5" (quote mh-indicate-seq))

(define-key mh-keymap "6" (quote mh-indicate-seq))

(define-key mh-keymap "7" (quote mh-indicate-seq))

(define-key mh-keymap "8" (quote mh-indicate-seq))

(define-key mh-keymap "9" (quote mh-indicate-seq))

(define-key mh-keymap "f" (quote mh-visit-folder))

(define-key mh-keymap "i" (quote mh-inc-folder))

(define-key mh-keymap "c" (quote mh-close-folder))

(define-key mh-keymap "k" (quote mh-kill-folder))

(define-key mh-keymap "l" (quote mh-list-folders))

(define-key mh-keymap "p" (quote mh-renumber-folder))

(define-key mh-keymap "r" (quote mh-rescan-folder))

(define-key mh-keymap "s" (quote mh-search-folder))
